<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Users extends MN_Controller {

    function __construct() {
        parent::__construct();
        $this->load->helper(array('url', 'form'));
        $this->load->library('ion_auth');
        $this->load->library('session');
        $this->load->model('Persona_Model');
        $this->load->model('Users_Model');
    }

    public function inicio() {
        if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_teacher()  ) {
            $this->session->set_flashdata('message', 'No pertence al grupo de Docentes');

            redirect('auth/login', 'refresh');
        }

        
        $this->data['usuarios'] = $this->Users_Model->getListadoUsers();
        $this->data['user'] = $this->ion_auth->get_user_username();
        $this->_render('users/start');
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */
